package com.tsingtree.modular.service.impl;

import com.tsingtree.modular.entity.NanAppReview;
import com.tsingtree.modular.mapper.NanAppReviewMapper;
import com.tsingtree.modular.model.params.NanAppReviewParam;
import com.tsingtree.modular.model.result.NanAppReviewResult;
import com.tsingtree.modular.service.NanAppReviewService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tsingtree.base.pojo.page.LayuiPageInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tsingtree.base.pojo.page.LayuiPageFactory;

/**
 * <p>
 * APP评论 服务实现类
 * </p>
 *
 * @author jagger
 * @since 2025-10-28
 */
@Service
public class NanAppReviewServiceImpl extends ServiceImpl<NanAppReviewMapper, NanAppReview> implements NanAppReviewService {

    @Override
    public LayuiPageInfo findPageBySpec(NanAppReviewParam param){
        Page pageContext = getPageContext();
        IPage<NanAppReviewResult> page = this.baseMapper.customPageList(pageContext, param);
        return LayuiPageFactory.createPageInfo(page);
    }

    private Page getPageContext() {
        return LayuiPageFactory.defaultPage();
    }

}
